package util;

import java.util.ArrayList;
import java.util.List;

public class Tree<P> {
	
	private P value;
	private List<Tree<P>> subTree;
	
	public Tree(P value) {
		
		this.value = value;
		this.subTree = null;
	}
	
	public P getValue() {
		
		return this.value;
	}
	
	public void addLeaf(Tree<P> t) {
		
		if (subTree == null)
			subTree = new ArrayList<Tree<P>>();
		
		subTree.add(t);
	}
}
